import { configureStore } from '@reduxjs/toolkit'
import reducers from './reducers'

//暴露store 
const store =  configureStore({
  reducer: reducers
})

export const selectCount = (state: RootState) => state.count
export type RootState = ReturnType<typeof store.getState>
export type AppDispatch = typeof store.dispatch
export default store